import $axios from "./$axios.js"

export const get_consumer_email_yzm = async (email) => {
  await $axios({
    url: '/api/consumer/email_yzm',
    params: {
      email
    }
  })
}

export const post_consumer_pwdLogin = async (email, yzm, pwd) => {
  return await $axios({
    method: 'post',
    url: '/api/consumer/pwdLogin',
    data: {
      email,
      yzm,
      pwd
    }
  })
}

export const post_consumer_login = async (email, yzm, email_yzm) => {
  return await $axios({
    method: 'post',
    url: '/api/consumer/login',
    data: {
      email,
      yzm,
      email_yzm
    }
  })
}

export const post_consumer_register = async (email, yzm, email_yzm, pwd) => {
  return await $axios({
    method: 'post',
    url: '/api/consumer/register',
    data: {
      email,
      yzm,
      email_yzm,
      pwd
    }
  })
}